import { createFetchHandler } from '@alilc/lowcode-datasource-fetch-handler';
import utils, { createAxiosHandler } from './shared/utils';
import functions from './shared/functions';
import constant from './shared/constant';

export const constants = {
  ...constant, // 公共静态变量
  APP_NEST: process.env.APP_NEST, // 公共环境变量
}

const appHelper = {
  requestHandlersMap: {
    fetch: createFetchHandler(),
    axios: createAxiosHandler()
  },
  utils: {
    ...functions, // 公共函数
  },
  constants
};
export default appHelper;